#ifndef DRAGGEDRELATION_H
#define DRAGGEDRELATION_H

#include <QGraphicsItemGroup>
#include <QPen>
#include <QPolygonF>
#include <QGraphicsPolygonItem>

#include "uml/relations/decorators/decoratorgraphicsitem.h"

class UmlRelationalItem;
class UmlRelation;

class DraggedRelation : public QGraphicsItemGroup
{
public:
    explicit DraggedRelation(QGraphicsItemGroup *parent = 0);

    UmlRelationalItem *startItem();
    void setStartItem(UmlRelationalItem *item);

    void setMousePos(QPointF pos);
    void setDecorator(QPolygonF decorator);

    UmlRelation* relation();
    void setRelation(UmlRelation* relation);

private:
    UmlRelationalItem *_startItem;

    UmlRelation *_relation;

    QPointF _startPos;

    QPointF _mousePos;

    QPen _pen;

    QGraphicsLineItem _lineGraphicsItem;

    DecoratorGraphicsItem _decoratorGraphicsItem;

};

#endif // DRAGGEDRELATION_H
